package com.yixing.demo.mapper;

import com.yixing.demo.model.Music;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface MusicMapper {
    Integer insertMusic(String title, String singer, String time, String url, Integer userId);
    @Select("select * from music where title = #{title}")
    Music inspectMusicIsExist(String title);

    Music inspectMusicIsExistById(Integer id);

    Integer deleteMusicById(Integer id);

    List<Music> seekMusicByTitle(String title);

    List<Music> seekMusicByNoTitle();
}
